import { createStore } from 'vuex'

import createPersistedState from "vuex-persistedstate";
export default createStore({
  plugins: [
    // 默认储存在localstorage
    createPersistedState({
      // 本地储存名
      key: 'vuex',
    })
  ],
  state: {

    tc: 0,

    sta: 0,

    Companydetails: {},

    Bulletin: {},

  },
  getters: {
  },
  mutations: {

    tcupdata(state, payload) {
      state.tc = payload
    },
    tcupdata2(state, payload) {
      state.tc = payload
    },

    tcupdataa(state, payload) {
      state.sta = payload
    },
    tcupdataa2(state, payload) {
      state.sta = payload
    },

    upCompanydetails(state, payload) {
      state.Companydetails = payload
    },

    upBulletin(state, payload) {
      state.Bulletin = payload
    }

  },
  actions: {
  },
  modules: {
  }
})
